import request from '@/utils/request'

export function add(data) {
  return request({
    url: 'api/moveWareHouseOrder',
    method: 'post',
    data
  })
}

export function del(ids) {
  return request({
    url: 'api/moveWareHouseOrder/',
    method: 'delete',
    data: ids
  })
}

export function edit(data) {
  return request({
    url: 'api/moveWareHouseOrder',
    method: 'put',
    data
  })
}

// 取消移库单
export function cancelOrderAPI(data) {
  return request({
    url: `api/moveWareHouseOrder/cancelOrder/${data}`,
    method: 'get',
    data
  })
}

// 执行移库单
export function excuteOrderAPI(data) {
  return request({
    url: `api/moveWareHouseOrder/execute/${data}`,
    method: 'get',
    data
  })
}

export default { add, edit, del }
